Avoid bun memory leak bug from TransformStream#4255
Avoid bun memory leak bug from TransformStream#4255TheodoreSpeaks wants to merge 3 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
@BugBot review |
PR SummaryMedium Risk Overview
Agent streaming memory persistence is moved from Reviewed by Cursor Bugbot for commit bf2f9af. Bugbot is set up for automated code reviews on this repo. Configure here. |
Previously, if the onStream consumer caught an internal error without re-throwing, the block-executor would treat the shortened accumulator as the complete response, persist a truncated string to memory via appendToMemory, and set it as executionOutput.content. Track whether the source ReadableStream actually closed (done=true) in the pull handler. If onStream returns before the source drains, skip content persistence and log a warning — the old tee()-based flow was immune to this because the executor branch drained independently of the client branch. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@BugBot review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit bf2f9af. Configure here.
Summary
Bun has a bug in TransformStream: oven-sh/bun#28035 causing high memory consumption due to no backpressure signal. We use this in
Type of Change
Testing
Checklist
Screenshots/Videos